Call Arity
نویسنده
چکیده
Higher order combinators in functional programming languages can lead to code that would be considerably more efficient if some functions’ definitions were eta-expanded, but the existing analyses are not always precise enough to allow that. In particular, this has prevented the implementation of foldl via foldr, which would allow foldl to take part in list fusion. Call Arity is an analysis that eta-expands functions based on their uses, instead of their definitions, and is very precise in the presence of recursion. Its inclusion in GHC now allows foldl-based combinators to take part in list fusion.
منابع مشابه
The Safety of Call Arity
We formalize the Call Arity analysis [Bre15a], as implemented in GHC, and prove both functional correctness and, more interestingly, safety (i.e. the transformation does not increase allocation). A highlevel overview of the work can be found in [Bre15b]. We use syntax and the denotational semantics from an earlier work [Bre13], where we formalized Launchbury’s natural semantics for lazy evaluat...
متن کاملEllipses and Lambda Definability
Ellipses are a meta-linguistic notation for denoting terms the size of which are specified by a meta-variable that ranges over the natural numbers. In this work, we present a systematic approach for encoding such meta-expressions in the λ-calculus, without ellipses: Terms that are parameterized by meta-variables are replaced with corresponding λ-abstractions over actual variables. We call such ...
متن کاملXML Processing and Logic Programming
In this paper we describe a constraint solving module which we call CLP(Flex), for dealing with the unification of terms with flexible arity function symbols. This approach results in a flexible and high declarative model for XML processing.
متن کاملk-Valued non-associative Lambek grammars are learnable from generalized functor-argument structures
This paper is concerned with learning categorial grammars from positive examples in the model of Gold. Functor-argument structures (written FA) are usual syntactical decompositions of sentences in sub-components distinguishing the functional parts from the argument parts defined in the case of classical categorial grammars also known as AB-grammars. In the case of non-associative type-logical g...
متن کاملSub-tree Swapping Crossover and Arity Histogram Distributions
Recent theoretical work has characterised the search bias of GP subtree swapping crossover in terms of program length distributions, providing an exact fixed point for trees with internal nodes of identical arity. However, only an approximate model (based on the notion of average arity) for the mixed-arity case has been proposed. This leaves a particularly important gap in our knowledge because...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Computer Languages, Systems & Structures
دوره 52 شماره
صفحات -
تاریخ انتشار 2014